<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});


// 后台
Route::group(['prefix' => 'admin'], function () {

    # 登录
    Route::match(['get', 'post'], '/mobileLogin', 'Admin\Mobile\AuthController@login');


    # 需要登录的页面
    Route::group(['middleware'=>['agent','agent.login']],function () {
        #首页
		Route::get('/home', 'Admin\Mobile\AuthController@home');
        #注册
        Route::match(['get', 'post'], '/registrationWeb','Admin\Mobile\AuthController@registrationWeb');
		#退出登录
		Route::get('/mobileLogout', 'Admin\Mobile\AuthController@logout');

            #我的账单
            Route::get('/billIndex', 'Admin\Mobile\BillController@index')->middleware('person');
            #账单详情
            Route::get('/billDetail/{data}', 'Admin\Mobile\BillController@detail')->middleware('person');
            #通知
            Route::get('/agentInform', 'Admin\Mobile\WithdrawController@agentInform')->middleware('person');
            #提现
            Route::match(['get', 'post'], '/kiting', 'Admin\Mobile\WithdrawController@kiting')->middleware('person');
            #个人中心
            Route::get('/person', 'Admin\Mobile\WithdrawController@person')->middleware('person');
            #我的代理用户
            Route::get('/agencyUser', 'Admin\Mobile\WithdrawController@agencyUser')->middleware('person');
            #历史记录
            Route::get('/historyRecord', 'Admin\Mobile\WithdrawController@historyRecord')->middleware('person');
            #修改密码
            Route::match(['get', 'post'], '/amendPassword', 'Admin\Mobile\AuthController@amendPassword')->middleware('person');
            #找回密码
            Route::match(['get', 'post'], '/findPassword', 'Admin\Mobile\AuthController@findPassword')->middleware('person');
            #二级密码
            Route::match(['get', 'post'], '/secondPassword', 'Admin\Mobile\AuthController@secondPassword');
    });


});